<template>
  <div>
    <el-dialog
      :visible.sync="dialogVisible"
      width="50%">

      <el-form ref="form" :model="form" label-width="110px">
        <el-form-item label="借款人姓名">
          <el-input v-model="form.applyUserName"></el-input>
        </el-form-item>
        <el-form-item label="身份证号">
          <el-input v-model="form.idCard"></el-input>
        </el-form-item>
        <el-form-item label="收入情况">
          <el-input v-model="form.phone"></el-input>
        </el-form-item>
        <el-form-item label="名下是否有房产">
          <el-input v-model="form.ownerHouse"></el-input>
        </el-form-item>
        <el-form-item label="名下是否有车辆">
          <el-input v-model="form.ownerCar"></el-input>
        </el-form-item>
        <el-form-item label="担保人姓名">
          <el-input v-model="form.guaranteeName"></el-input>
        </el-form-item>
        <el-form-item label="担保人身份证号">
          <el-input v-model="form.guaranteeIdCard"></el-input>
        </el-form-item>
        <el-form-item label="担保人电话">
          <el-input v-model="form.guaranteePhone"></el-input>
        </el-form-item>
      </el-form>

      <span slot="footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="submitInfo">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
  import { checkApply } from '@/api/loanInfo'
  export default {
    data() {
      return {
        dialogVisible: false,
        form: {
          id: '',
          applyUserName: '',
          idCard: '',
          phone: '',
          ownerHouse: '',
          ownerCar: '',
          guaranteeName: '',
          guaranteeIdCard: '',
          guaranteePhone: '',
          loanStatus: '2',
          taskId: '',
          approve: '1'
        }
      };
    },
    methods: {
      submitInfo(){
        checkApply(this.form).then(res => {
          if(res.code === 200){
            alert("提交成功")
          }
        })
      }
    }
  };
</script>

<style scoped>

</style>
